<template>
    <div>
        <h1>登录</h1>
        <table class="table table-bordered">
            <tbody>
                <tr>
                    <th align="right">管理员名称</th>
                    <th><input type="text" v-model="queryinfo.AName"></th>
                </tr>
                <tr>
                    <th align="right">密码</th>
                    <th><input type="password" v-model="queryinfo.APwd"></th>
                </tr>
                <tr>
                    <th align="right"></th>
                    <th><input type="button" value="登录" class="btn btn-primary" @click="ok"></th>
                </tr>
            </tbody>
        </table>
    </div>
</template>

<script setup lang="ts">
import { ref,reactive,onMounted } from 'vue';
import moment from 'moment';
import axios from 'axios';
import { useRoute,useRouter } from 'vue-router';
const route = useRoute();
const router = useRouter();

let queryinfo:any=reactive({
    AName:"",
    APwd:""
})


const ok=()=>{
    axios({
        url:'/api/House/AdminLogin',
        method:'get',
        params:queryinfo
    })
    .then((res)=>{
        console.log(res);

        alert("登录成功")
        router.push('/houseadd')
    })
}


</script>

<style scoped>

</style>